/**
 * 
 */
package cn.cit.wcif.member.api.persistence;

import org.springframework.stereotype.Repository;

import cn.cit.wcif.member.api.IMember;
import cn.cit.wcif.member.api.exceptions.EmailExistenceException;
import cn.cit.wcif.member.api.exceptions.NameExistenceException;
import cn.cit.wcif.member.api.exceptions.ObjectNonExistenceException;

/**
 * @author Administrator
 * 
 */
@Repository
public interface IMemberPersistenceService {
	/**
	 * 
	 * @param member
	 * @return
	 */
	IMemberEntity persistMember(IMember member);

	/**
	 * 
	 * @param email
	 * @param password
	 * @return
	 * @throws ObjectNonExistenceException
	 */
	IMemberEntity findMemberByIdentity(String email, String password)
			throws ObjectNonExistenceException;

	/**
	 * 
	 * @param email
	 * @param password
	 * @param name
	 * @return
	 * @throws EmailExistenceException
	 * @throws NameExistenceException
	 */
	IMemberEntity saveMember(String email, String password, String name)
			throws EmailExistenceException, NameExistenceException;

	/**
	 * 
	 * @param email
	 * @param password
	 * @return
	 * @throws EmailExistenceException
	 */
	IMemberEntity saveMember(String email, String password)
			throws EmailExistenceException;
}
